//
//  PPFanModel.m
//  
//
//  Created by GaoYongyue on 16/9/13.
//
//

#import "PPFanModel.h"

@implementation PPFanModel

// Insert code here to add functionality to your managed object subclass
+ (instancetype)existingFanForUserID:(PPUserID)userID {
    PPFanModel *fan = [self find:@{@"userID" : userID, @"currentUserID" : DGCurrentAccount.userID}];

    if(fan == nil) {
        fan = [PPFanModel create];
        fan.userID = userID;
        fan.currentUserID = DGCurrentAccount.userID;
        [fan.managedObjectContext saveContext];
    }

    return fan;
}
@end
